package com.myjavalab.core;

import com.myjavalab.util.PrintUtil;

public class NestedClassTest {

	public static void main(String[] args) {
		ParentClass p = new ParentClass();
		p.getNestedClass().say();
	}
}

class ParentClass {
	public NestedInterface getNestedClass() {
		return new NestedInterface() {

			@Override
			public void say() {
				PrintUtil.prt("I am nested.");
				
			}
			
		};
	}
}

interface NestedInterface {
	public void say();
}